{% extends 'base.html' %}
{% load static blog_extra %}
{% block base_content %}
    <div class="col-content">
        <div class="inner">
            <input type="hidden" value="{{ blog_category_id }}" id="blogtypeid">
            {% block content %}

            {% endblock %}
        </div>
    </div>
    <div class="col-other">
        <div class="inner">
            <div class="other-item" id="categoryandsearch">
                <div class="search">
                    <form action="{% url 'blog:search' %}" class="search-wrap">
                        <input type="text" id="searchtxt" name="q" placeholder="输入关键字搜索" required/>
                        <span class="search-icon"><i class="fa fa-search"></i></span>
                    </form>
                    <ul class="search-result"></ul>
                </div>
                <ul class="category mt20" id="category">
                    <li data-index="0" class="slider"></li>
                    <li data-index="1"><a href="{% url 'blog:article-list' %}">全部文章</a></li>
                    {% category_list 'pc' %}
                </ul>
            </div>
            <!--右边悬浮 平板或手机设备显示-->
            <div class="category-toggle">
                <i class="layui-icon">&#xe603;</i>
            </div>
            <div class="article-category">
                <div class="article-category-title">分类导航</div>
                {% category_list 'phone' %}
                <div class="f-cb"></div>
            </div>
            <!--遮罩-->
            <div class="blog-mask animated layui-hide"></div>
            <div class="other-item">
                <h5 class="other-item-title">热门文章</h5>
                <div class="inner">
                    <ul class="hot-list-article">
                        {% for article in hot_articles %}
                            <li><a href="{{ article.get_absolute_url }}">{{ article.title }}</a></li>
                        {% endfor %}
                    </ul>
                </div>
            </div>
            <div class="other-item">
                <h5 class="other-item-title">置顶推荐</h5>
                <div class="inner">
                    <ul class="hot-list-article">
                        {% for article in top_articles %}
                            <li><a href="{{ article.get_absolute_url }}">{{ article.title }}</a></li>
                        {% endfor %}
                    </ul>
                </div>
            </div>
            {% if "SHOW_VISITOR"|get_config %}
                <div class="other-item">
                    <h5 class="other-item-title">最近访客</h5>
                    <div class="inner">
                        <dl class="vistor">
                            {% visitor_list %}
                        </dl>
                    </div>
                </div>
            {% endif %}
        </div>
    </div>
{% endblock %}
